<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>佣金记录</title>
		
		
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<!-- jQuery文件。务必在bootstrap.min.js之前引入 -->
		<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
		
		<link rel="stylesheet" href="__STATIC__/jcweb/css/base.css" />
		<link rel="stylesheet" href="__STATIC__/jcweb/css/my.css" />	
		<script src="__STATIC__/jcweb/js/utils.js"></script>	
		{include file="public/wxopera" /}	
	</head>
	<body>
		
		{include file="public/footer" /}		
		
		<section class="sectionContent" style="font-size: 1.4rem;">
		<div id="history_div">
		{volist name="data" id="v"}
			<div class=" flex v-center" style="height: 60px;border-bottom:1px solid #A9A9A9;">
	       	   <div>
					<img src="{$v['userinfo']['imgurl']}" style="width: 50px;padding-left: 15px;"/>
				</div>
				<div class="flex-1"style="padding-left: 10px;padding-right: 5px;">
					<div class="flex">
						<div class="flex-1">
							昵称：{$v['userinfo']['nickname']}
						</div>
						
						<div>
						{$v['create_time']}
						</div>
					</div>
					<div class="flex">
						<div class="flex-1">
							级别：{$v['dengji']}
						</div>
						
						<div>
						佣金:{$v['money']/100}元
						</div>
					</div>
				</div>
				<div class="flex v-center">
				{if$v['is_fa']==1}
				已发放
				{else}
				未发放
				{/if}
				</div>
	       </div>		
			{/volist}
		</div>
			
			
			{if(count($data)==0)}
			<img src="__STATIC__/jcweb/img/nodata.jpg" class="fill-w"/>
			{else}
			<div id="more" class="flex h-center v-center" style="height:40px;background:#ccc">
				查看更多
				</div>
			{/if}
		</section>	
		<input type="hidden" id="pages" value="{$page}" />
		<script>
		$(function(){
		$("#more").click(function(){
		var apihost = "{$apihost}";
		var pages = parseInt($("#pages").val())+1;
		var  url= apihost+"getyjHis";
		post2(url,{page:pages},function(data){
		if(data.length<10){
		$("#more").unbind("click");
		$("#more").text("没有更多了");
		}else{
		$("#pages").val(pages);
		}
		for(var i=0;i<data.length;i++){
			
			var tmps = "";
			if(data[i]['is_fa']==1){
				tmps = "已发放";
			}else{
				tmps = "未发放";
			}
			
		var html='<div class=" flex v-center" style="height: 60px;border-bottom:1px solid #A9A9A9;"><div>'+
		'<img src="'+data[i]['userinfo']['imgurl']+'" style="width: 50px;padding-left: 15px;"/></div><div class="flex-1"style="padding-left: 10px;padding-right: 5px;">'+
		'<div class="flex"><div class="flex-1">昵称：'+data[i]['userinfo']['nickname']+'</div><div>'+data[i]['create_time']+'</div></div>'+
		'<div class="flex"><div class="flex-1">级别：'+data[i]['dengji']+'</div><div>佣金:'+parseFloats((data[i]['money']/100))+'元</div></div></div>'+
	'<div class="flex v-center">'+tmps+'</div></div>';
		$("#history_div").append(html);
		
		
		
		}
		
		});
		
		});
		});
		</script>	
</body>
</html>
